%% Output statistic generation function with multidimensional random variables as input
%% ============================ [function description] ============================
%% Prerequisite files.
%polCoeCal.m
%Inputs.
%inputData------ input values for matching points, matrix
%outputData----- output value of the matching point, matrix
%order---------- polynomial order, value
%output.
%PCmean--------- mean value by orthogonal polynomial property, value
%PCvar---------- variance by orthogonal polynomial property, value
%% ============================��body��============================
function [PCmean,PCvar]=GetStat(inputData,outputData,order)
[c,~]=polCoeCal(inputData,outputData,order);%Find the Ermitian polynomial coefficients, polynomial expressions
PCmean=c(1); % find the mean by orthogonal polynomial property, the first term of the polynomial is the mean of the random variable
PCvar=0;
    for i=2:length(c)       %-|
        PCvar=PCvar+c(i)^2; %-|---Squared by orthogonal polynomial, with all terms except the first term of order
    end                     %-| sum of squares
end

